<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<html:html>
<head>
<title>Sistema CUCEI</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="css/formas.css" rel="stylesheet" type="text/css">
<logic:present name="req_msg">
	<script>
		alert("<bean:write name='req_msg'/>");
	</script>
</logic:present>
<script language="javascript" type="text/javascript" src="js/util.js"></script>
<script language="javascript" type="text/javascript">
function fnc_validarForma( forma ){
	var bol_retVal = true;
	var str_errores = "";
	if( !Trim( forma.document.value ) ){
		str_errores += " - <bean:message key="Document.doc"/> <bean:message key='errors.required'/>\n";
	}else if( !Trim( forma.description.value ) ){
		str_errores += " - <bean:message key="Document.desc"/> <bean:message key='errors.required'/>\n";
	}
	if( str_errores != "" ){
		bol_retVal = false;
		alert( " <bean:message key='Application.Error(s)'/> : \n" + str_errores );
	}
	return bol_retVal;
}
</script>
</head>
<body>
<html:form action="/document_save" onsubmit="return fnc_validarForma(this);" enctype="multipart/form-data">
<table cellpadding="0" cellspacing="0" class="formas">
  <tr> 
    <td> 
    	<table cellpadding="0" cellspacing="0" class="barraNavegacion">
				<tr>
			       	<td><html:link action="/academy_welcome?action=selectAcademy" styleClass="barraNavegacion"><img src="images/icn_liga.gif" border="0"><bean:message key="AcademyWelcome.Init"/></html:link>
					       	<html:link action="/academy_list" styleClass="barraNavegacion"><img src="images/icn_liga.gif" border="0"><bean:message key="Menu.AcademyHeader"/></html:link>
				       		<html:link action="/draft_list?action=listDrafts" styleClass="barraNavegacion"><img src="images/icn_liga.gif" border="0"><bean:message key="Agreement.drafts"/></html:link>
			        		<html:link action="/draft_edit?action=editDraft" styleClass="barraNavegacion"><img src="images/icn_liga.gif" border="0"><bean:message key="Agreement.draftEdit"/></html:link>
			        		<html:link action="/document_list" styleClass="barraNavegacion"><img src="images/icn_liga.gif" border="0"><bean:message key="Document"/></html:link>
		              	</td>
	    			</tr>
      </table>
      <table cellpadding="0" cellspacing="0" class="titulo">
				<tr> 
					<td class="iconos_imgs"> <a href="#"><img src="images/icn_correo.gif" alt="Correo-e" width="18" height="18" border="0"></a> </td>
          <td class="txt_titulo"> <bean:message key="Document"/> </td>
				</tr>
			</table>
		</td>
  </tr>
  <tr> 
  	<td width="145" class="formas-encabezado"><bean:message key="Document.draftData"/> </td>
	</tr>
  <tr> 
  	<td >
  		<table cellpadding="0" cellspacing="2" class="info_titulo">
				<tr> 
      		<td class=""><strong> <bean:message key="Document.draft"/> </strong></td>
      		<td class=""> <bean:write name="bean_minuta" property="int_tk"/> </td>
				</tr>
      	<tr> 
      		<td class=""><strong> <bean:message key="Document.content"/> </strong></td>
        	<td class=""> <bean:write name="bean_minuta" property="str_asunto"/> </td>
        </tr>
      </table>
    </td>
	</tr>
  	<tr> 
          <td class="formas-encabezado"><bean:message key="Document.data"/></td>
        </tr>
        <tr> 
          <td><table cellpadding="0" cellspacing="2" class="info_formas">
              <tr> 
                <td class=""><bean:message key="Document.doc"/></td>
                <td class=""><html:file property="document" size="45"/></td>
              </tr>
              <tr> 
                <td class=""><bean:message key="Document.desc"/></td>
                <td class=""><html:text property="description" size="58" maxlength="50"/></td>
              </tr>
              	<tr> 
					<td colspan="6" align="center">
						<div align="center">
							<html:submit property="btn_aceptar"><bean:message key="Application.Accept" /></html:submit>
							<input type="button" onclick="location.href='document_list.do';" value="<bean:message key='Application.Cancel'/>"/>
						</div>
					</td>
				</tr>
              <tr> 
                <td colspan="2"> <div align="center"></div></td>
              </tr>
            </table></td>
        </tr>
</table>  
 </html:form>
</body>
</html:html>
